import { GSprite } from "../../../../../com/mui/controls/GSprite";
import { ObjCreate } from "../../common/ObjCreate";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { Language } from "../../../../../extend/language/Language";
import { ImagesConst } from "../../../resource/ImagesConst";
import { RuleExplainButton } from "../../common/button/RuleExplainButton";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { GTextFiled } from "../../../../../com/mui/controls/GTextFiled";
//class EliteDetailPanel
    
    export  class EliteDetailPanel extends GSprite
    {
        constructor()
        {
            super();
            ObjCreate.createBg(0, 0, 283, 150, this);
            ObjCreate.createBg(0, 154, 283, 297, this);
            var loc1=GlobalStyle.setTextFormatLeading(GlobalStyle.textFormat1, 5);
            this._txt1 = ObjCreate.createGTextField(Language.getString(60607), 10, 23, 260, 20, this, loc1, true, false);
            this._txt1.wordWrap = true;
            this._txt1.multiline = true;
            this._txt1.autoSize = flash.text.TextFieldAutoSize.LEFT;
            this._txt2 = ObjCreate.createGTextField(Language.getString(60626), 10, 84, 260, 20, this, loc1, true, false);
            this._txt2.wordWrap = true;
            this._txt2.multiline = true;
            this._txt2.autoSize = flash.text.TextFieldAutoSize.LEFT;
            ObjCreate.createBg(20, 335, 243, 2, this, ImagesConst.SplitLine);
            var loc2=new RuleExplainButton();
            var loc3=Language.getString(60631) + "\n" + Language.getString(60632) + "\n" + Language.getString(60633) + "\n" + Language.getString(60634) + "\n" + Language.getString(60635);
            loc2.tooltipText = HTMLUtil.addColor(loc3, "#B1efff");
            loc2.x = 203;
            loc2.y = 123;
            this.addChild(loc2);
            this.onResLoaded();
            return;
        }

        public onResLoaded(): void
        {
            if (GlobalClass.hasRes(ImagesConst.guildEliteText_fbcysj)) 
            {
                ObjCreate.createBitmap(ImagesConst.guildEliteText_fbcysj, 10, 5, this);
                ObjCreate.createBitmap(ImagesConst.guildEliteText_zjfstgz, 10, 66, this);
            }
            return;
        }

        /* internal */ /* var */_txt1: GTextFiled;

        /* internal */ /* var */_txt2: GTextFiled;
    }
